<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="common/css/jquery-weui.min.css" />
		<link rel="stylesheet" type="text/css" href="common/css/weui.min.css" />
		<link rel="stylesheet" type="text/css" href="common/iconfont/iconfont.css" />
		<link rel="stylesheet" type="text/css" href="common/css/loading.css"/>
		<script src="common/js/av-min-2.1.2.js" type="text/javascript" charset="utf-8"></script>
		<script src="common/js/base.js" type="text/javascript" charset="utf-8"></script>
		<script src="common/js/vue.js" type="text/javascript" charset="utf-8"></script>
		<style type="text/css">
			* {
				margin: 0px;
				padding: 0px;
			}
			
			body {
				display: -webkit-box;
				-webkit-box-orient: vertical;
				background-color: #F3F5F7;
				font-family: "微软雅黑";
			}
			
			.footer {
				position: fixed;
				bottom: 0;
			}
			
			.weui-tabbar__item:nth-child(3) i,
			.weui-tabbar__item:nth-child(3) p {
				color: red;
			}
			
			.header {
				display: -webkit-box;
				height: 45px;
				-webkit-box-align: center;
				-webkit-box-pack: center;
			}
			
			.list {
				display: -webkit-box;
				-webkit-box-orient: vertical;
				overflow: hidden;
			}
			
			.list .item {
				display: -webkit-box;
				-webkit-box-flex: 1;
				-webkit-box-align: center;
				background-color: #ffffff;
				border-bottom: 1px solid gainsboro;
			}
			
			.item .product {
				display: -webkit-box;
				overflow: hidden;
				-webkit-box-flex: 1;
				-webkit-box-align: center;
			}
			
			.item .product .pic {
				display: -webkit-box;
				width: 90px;
				margin: 0px 5px;
			}
			
			.item .product .pic img {
				width: 100%;
				border: 1px solid #e3e5e9;
				border-radius: 6px;
			}
			
			.item .product .info {
				display: -webkit-box;
				-webkit-box-orient: vertical;
				-webkit-box-flex: 1;
				margin: 0px 5px;
				height: 125px;
			}
			
			.item .product .title {
				display: -webkit-box;
				height: 35px;
				line-height: 17px;
				margin-top: 3px;
				padding: 0 3px;
				font-size: 13px;
				color: #666;
				overflow: hidden;
				text-overflow: ellipsis;
				-webkit-line-clamp: 2;
				-webkit-box-orient: vertical;
				word-break: break-all;
			}
			
			.item .product .color {
				display: -webkit-box;
				overflow: hidden;
				text-overflow: ellipsis;
				-webkit-box-orient: vertical;
				-webkit-line-clamp: 1;
				word-break: break-all;
				color: #81838E;
				font-size: 12px;
				margin-top: 2px;
			}
			
			.item .product .price {
				margin-top: 10px;
				display: -webkit-box;
				color: #F23030;
				-webkit-box-align: center;
			}
			
			.item .price .num {
				display: -webkit-box;
				-webkit-box-flex: 1;
				-webkit-box-pack: end;
				-webkit-box-align: center;
				margin-right: 10px;
			}
			
			.item .price .num .icon {
				width: 25px;
				height: 25px;
				color: #F23030;
				font-size: 20px;
				text-align: center;
				line-height: 25px;
				display: block;
			}
			
			.item .price .num input {
				width: 25px;
				height: 25px;
				border-top: 1px solid #ECECEC;
				border-bottom: 1px solid #ECECEC;
				border-left: 1px solid transparent;
				border-right: 1px solid transparent;
				text-align: center;
			}
			
			.item .cannel {
				display: -webkit-box;
				font-size: 12px;
				color: #666666;
				margin-left: 5px;
			}
			
			.item .cannel span {
				border: 1px solid;
				box-sizing: border-box;
				border-radius: 3px;
				padding: 1px;
				margin-bottom: 5px;
			}
			
			.nomore {
				display: -webkit-box;
				overflow: hidden;
				-webkit-box-align: center;
				-webkit-box-pack: center;
			}
			
			.nomore img {
				width: 196px;
				height: 72px;
			}
		</style>
	</head>

	<body ontouchstart>
		<div class="csshub-loading" v-if="isLoading">
			<span></span>
			<span></span>
			<span></span>
			<span></span>
		</div>
		<div v-if="!isLoading">
			<div class="header">
				我的收藏
			</div>
			<div class="list" v-for="item in favList">
				<div class="item">
					<div class="product">
						<div class="pic"><img v-bind:src="item.attributes.image[0]" /></div>
						<div class="info">
							<div class="title" v-html="item.attributes.title"></div>
							<div class="color" v-html="item.attributes.style[0]"></div>
							<div class="price">
								￥
								<div v-html="item.attributes.price[0]"></div>
								<div class="num">
									<i class="icon Hui-iconfont" @click="addCart($index)">&#xe670;</i>
								</div>
							</div>
							<div class="cannel"><span @click="deleteFav($index)">取消收藏</span></div>
						</div>
					</div>
				</div>
			</div>
			<div class="nomore">
				<img src="img/no-more.png" />
			</div>
			<div class="weui-tabbar footer">
				<a href="index.html" class="weui-tabbar__item">
					<div class="weui-tabbar__icon">
						<i class="icon Hui-iconfont">&#xe625;</i>
					</div>
					<p class="weui-tabbar__label">首页</p>
				</a>
				<a href="type.html" class="weui-tabbar__item">
					<div class="weui-tabbar__icon">
						<i class="icon Hui-iconfont">&#xe667;</i>
					</div>
					<p class="weui-tabbar__label">分类</p>
				</a>
				<a href="fav.html" class="weui-tabbar__item">
					<div class="weui-tabbar__icon">
						<i class="icon Hui-iconfont">&#xe61b;</i>
					</div>
					<p class="weui-tabbar__label">收藏</p>
				</a>
				<a href="cart.html" class="weui-tabbar__item">
					<div class="weui-tabbar__icon">
						<i class="icon Hui-iconfont">&#xe6b9;</i>
					</div>
					<p class="weui-tabbar__label">购物车</p>
				</a>
				<a href="my.html" class="weui-tabbar__item">
					<div class="weui-tabbar__icon">
						<i class="icon Hui-iconfont">&#xe60d;</i>
					</div>
					<p class="weui-tabbar__label">我的</p>
				</a>
			</div>
		</div>

		<script src="common/js/jquery-2.1.4.js" type="text/javascript" charset="utf-8"></script>
		<script src="common/js/fastclick.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$(function() {
				FastClick.attach(document.body);
			});
		</script>
		<script src="common/js/jquery-weui.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="vue/favVue.js" type="text/javascript" charset="utf-8"></script>
	</body>

</html>